<script setup>
  import { reactive, ref } from 'vue'
  // 操作style=>行内样式
    //1.:style="{属性名:属性值，属性名:属性值}"
    //2.:style="样式对象"
  let colorStr = ref('red')
  let colorClass = reactive({
    color:'black',
    background: 'blue'
  })
</script>

<template>
  <div>
    <p :style="{color:colorStr}">key value行内样式</p>
    <p :style="colorClass">样式对象</p>
  </div>
</template>

<style scoped>

</style>